package com.lun.blog.utils;

import org.springframework.util.DigestUtils;

import java.sql.DataTruncation;

/**
 * md5加密工具类
 */
public class EncryptionUtil {

    public static String encode(String password){
        return DigestUtils.md5DigestAsHex(password.getBytes());
    }

    public static void main(String[] args) {
        EncryptionUtil util=new EncryptionUtil();
        String encode = util.encode("lunjia218");
        System.out.println(encode);
    }
}
